package com.ithuaxin.method;

import com.ithuaxin.identifier.Count;
import com.ithuaxin.identifier.Sum;
import com.ithuaxin.identifier.Sum2;

public class Test6 {
    public static void main(String[] args) {
        int number = 18792;
        int number2 = number;
        int count = 0;
        while (number != 0){
            number = number / 10 ;
            count++;
        }
        int arr[] = new int[count];
        for (int i = arr.length-1; i >= 0; i--) {
            arr[i] = number2 % 10;
            number2 = number2 / 10;
        }
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }

        int temp;
        int Sum = 0;
        for (int i = 0; i < arr.length; i++) {
            arr[i] = arr[i] + 5;
        }
        for (int i = 0; i < arr.length; i++) {
            arr[i] = arr[i] % 10;
        }
        for (int i = 0,j=arr.length-1; i < j; i++,j--) {
            temp = arr[i];
            arr[i] = arr[j];
            arr[j] = temp;
        }
        for (int i = 0; i < arr.length; i++) {
            Sum = Sum * 10 + arr[i];
        }
        System.out.println(Sum);
    }
}
